<?

class sliderController extends iMVC_Controller{


    public function del(){
    
        $id=$_GET['id']; 
        $slider=new sliderModel();
        $slider->slider_id=$id;
        $slider->del();
        header("location:".$this->getBaseUrl()."admin/slider");
    }   
    public function add(){
        $title=$_POST["title"]; 
        $url=$_POST["url"];
        $pic=$_POST["slider"];
        $slider=new sliderModel();
        $slider->slider_title=$title;
        $slider->slider_url=$url;
        $slider->slider_pic=$pic;
        $slider->save();
        echo "<script>alert('添加成功');history.go(-1);</script>";
    
            
    
    
    
    }
    public function upForm(){
    
        $this->template_dir='admin/view/';
        $this->display("admin-slider.tpl");
    
    }

}
// vim600:ts=4 st=4 foldmethod=marker foldmarker=<<<,>>>
// vim600:syn=php commentstring=//%s
